﻿
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>ECharts</title>

</head>
<body>
<!-- 为ECharts准备一个具备大小（宽高）的Dom -->
<div id="main" style="width:80%;height: 520px;"></div>
<script  src="${request.getContextPath()}/js/echarts/echarts.js"></script>
<script  src="${request.getContextPath()}/js/echarts/echarts-tool.js"></script>
<script type="text/javascript">
    // 基于准备好的dom，初始化echarts实例
    var contextPath = "${request.getContextPath()}";
    eChartsTool.init(contextPath);
    var data=[];
    <g:each in="${stepDescTableList}" status="i" var="tableInstance">
           data.push('${tableInstance.DESCRIPTION}'+':'+'${tableInstance.LOT_SIZE}')
    </g:each>

    // 指定图表的配置项和数据
    var option = {
        title: {
            text: '各工序在制品批数'
        },
        tooltip: {},
        legend: {
            data:['批数']
        },
        xAxis: {
            data:data
        },
        yAxis: {},
        series: [{
            name: '批数',
            type: 'bar',
            data: ${stepDescTableList.LOT_SIZE}
        }]
    };

    // 使用刚指定的配置项和数据显示图表。
    eChartsTool.setOption("dark", document.getElementById('main'), option);

</script>
</body>
</html>


